Scalable and precise fitting of NURBS surfaces to large-size mesh representations

ABSTRACT

One embodiment of the invention disclosed herein provides techniques for fitting a mesh representation that includes a plurality of mesh points with a NURBS surface. A subdividing engine subdivides the mesh representation into a plurality of patches in a parametric domain. A vertex solving engine computes one or more vertex boundary continuity constraints for each vertex included in a plurality of vertices associated with the plurality of patches. An edge solving engine computes one or more edge boundary continuity constraints for each edge included in a plurality of edges associated with the plurality of patches. A patch solving engine fits a first patch included in the plurality of patches with at least one partial NURBS surface based on the vertex boundary continuity constraints and the edge boundary continuity constraints.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of the co-pending U.S. patentapplication titled, “SCALABLE AND PRECISE FITTING OF NURBS SURFACES TOLARGE-SIZE MESH REPRESENTATIONS,” filed on Dec. 17, 2015 and having Ser.No. 14/973,360. The subject matter of this related application is herebyincorporated herein by reference.

BACKGROUND OF THE INVENTION Field of the Invention

The present invention relates generally to computer-aided design (CAD)applications and, more specifically, to scalable and precise fitting ofNURBS surfaces to large-size mesh representations.

Description of the Related Art

In the field of computer-aided design and manufacturing, a physicalmodel of a new design is created by one or more engineers via aparticular medium. For example, a physical model for a new automobilebody design could be formed from clay. The surface of the physical modelis then scanned via some form of 3D digital data acquisition technology,such as a laser scanner, to create a machine-readable, three-dimensional(3D) representation of the physical model. Alternatively, the new designcan be generated via a computer using one or more 3D modelling programs,thereby obviating the need for creating and scanning a physical model ofthe new design. In either case, the output of the scanning technique ormodeling program is a large-size mesh representation of the new designthat consists of a large number of geometry primitives, such astriangles, quadrilaterals, or surface patches. Each geometry primitiveis represented by multiple mesh points at particular positions in 3Dspace. The large-size mesh representation may be further manipulated viaa computer-aided design system. Once complete, the large-size meshrepresentation can then be transferred to a manufacturing facility forfabrication of one or more prototypes of the new design.

In order to capture the fine surface details that may be associated withcomplex physical models, a larger-size mesh representation for a newdesign may typically contain many millions or billions of vertices.Because of the size and amount of information associated with suchlarge-size mesh representations, these representations are oftentimesdifficult to process and manipulate in current CAD systems withoutnoticeable performance degradation. Consequently, large-size meshrepresentations are usually converted into high-level smooth-surfacerepresentations that are compact in size and include the fine detail ofthe original large-size mesh representations. These high-levelsmooth-surface representations are easier to process and manipulate incurrent CAD program because local and global changes and edits can bemade to the high-level smooth-surface representation intuitively viamanipulating control points associated with the representation.

One such high-level smooth-surface representation is non-rationaluniform B-spline (NURBS) surface, which is a popular surfacerepresentation for industrial design applications and data exchangesbetween CAD systems. A large-size mesh representation can be convertedinto a NURBS surface via a fitting process, whereby the large-size meshrepresentation is fitted with a NURBS surface. The fitted NURBS surfaceapproximates the surface of the original large-size mesh representation.A NURBS surface exhibits excellent algorithmic properties relative tomesh representations, including convex hull and variation diminishingproperties, that lead to fast and numerically stable execution ofcertain geometric operations. Although a NURBS surface is compactcompared to a corresponding large-size mesh representation, in order toreproduce fine details of a large-size mesh representation via a NURBSsurface, a large number of control points need to be included in theNURBS surface. The number of control points can oftentimes exceed onemillion. Even though certain characteristics of NURBS surfaces can beexploited to simplify the process of converting a large-size meshrepresentation into a NURBS surface, as the number of control pointsincreases, the conversion process can nonetheless overwhelm aconventional CAD system in terms of both memory use and processingrequirements. Moreover, large-size mesh representations often includeimperfections, such as holes or surface gaps. When a large-size surfacerepresentation is fitted with a NURBS surface that includes suchimperfections, the resulting NURBS surface may exhibit correspondingimperfections.

To address the above issues, a “remeshing” process can be implementedwhen converting a large-size mesh representation into a NURBS surface.When being remeshed, the large-size mesh representation is divided intothousands of smaller quad-patches based on local principal curvaturedirections. The quad-patches are then individually converted intosmaller NURBS surfaces that are subsequently “stitched” together toapproximate the surface of the original large-size mesh representation.Oftentimes, converting small quad-patches into NURBS surfaces andstitching the NURBS surfaces together consumes fewer processing andmemory resources relative to converting a single large-size meshrepresentation into a single NURBS surface.

One drawback to remeshing a large-size mesh representation is that ahigh-quality remeshing is difficult to achieve when the originallarge-size mesh representation contains surface holes or cracks. Inaddition, certain applications, such as industrial design applications,may require curvature continuity, also referred to as G² continuity, inorder to meet aesthetic goals for the new design corresponding to agiven large-scale mesh representation. However, remeshing typicallyguarantees only tangency, also referred to as G¹ continuity, which isusually insufficient to meet G² continuity requirements. Further,tolerance control is sometimes difficult to achieve when performingremeshing operations, and certain subsequent processing operationsroutinely performed on single NURBS surfaces may perform inefficientlyor may fail altogether when applied to a collection of remeshed NURBSsurfaces. Stated another way, a collection of remeshed NURBS surfaceslacks the beneficial algorithmic properties of a single NURBS surface,such as convex hull and variation diminishing properties that result infast, numerically stable execution of geometric operations.

As the foregoing illustrates, what is needed are more effective ways toconvert large-size mesh representations of objects into NURBS surfaces.

SUMMARY OF THE INVENTION

One embodiment of the present application sets forth a method forfitting a mesh representation that includes a plurality of mesh pointswith a NURBS surface. The method includes subdividing the meshrepresentation into a plurality of patches in a parametric domain. Themethod further includes computing one or more vertex boundary continuityconstraints for each vertex included in a plurality of verticesassociated with the plurality of patches. The method further includescomputing one or more edge boundary continuity constraints for each edgeincluded in a plurality of edges associated with the plurality ofpatches. The method further includes fitting a first patch included inthe plurality of patches with at least one partial NURBS surface basedon the vertex boundary continuity constraints and the edge boundarycontinuity constraints.

Other embodiments of the present invention include, without limitation,a computer-readable medium including instructions for performing one ormore aspects of the disclosed techniques, as well as a system forperforming one or more aspects of the disclosed techniques.

At least one advantage of the disclosed techniques is that a large-sizemesh representation with fine details is precisely and accuratelyreconstructed as a single high-level smooth-surface representation, suchas a NURBS surface, while imperfections in the large-size meshrepresentation, such as holes and cracks, are repaired automatically.The characteristics of the resulting NURBS surface are more suitable forintegration in a typical industrial design workflow, relative to priortechniques.

BRIEF DESCRIPTION OF THE DRAWINGS

So that the manner in which the above recited features of the inventioncan be understood in detail, a more particular description of theinvention, briefly summarized above, may be had by reference toembodiments, some of which are illustrated in the appended drawings. Itis to be noted, however, that the appended drawings illustrate onlytypical embodiments of this invention and are therefore not to beconsidered limiting of its scope, for the invention may admit to otherequally effective embodiments.

FIG. 1 illustrates a computing system configured to implement one ormore aspects of the present invention;

FIG. 2 is a block diagram of a computer aided design (CAD) system asimplemented on the computer system of FIG. 1, according to variousembodiments of the present invention;

FIG. 3 illustrates an example of how a mesh representation is dividedinto rectangular patches in the (u, v) parametric domain, according tovarious embodiments of the present invention;

FIG. 4 illustrates an example of a hierarchical data structure for thedomain subdivision of FIG. 3, according to various embodiments of thepresent invention;

FIG. 5 illustrates how continuity constraints at a vertex of the meshrepresentation of FIG. 3 are computed, according to various embodimentsof the present invention;

FIG. 6 illustrates how continuity constraints at an edge of the meshrepresentation of FIG. 3 are computed, according to various embodimentsof the present invention;

FIG. 7 illustrates how a patch of the mesh representation of FIG. 3 isfitted with a NURBS surface, according to various embodiments of thepresent invention; and

FIG. 8 is a flow diagram of method steps for fitting a meshrepresentation that includes a plurality of mesh points with a NURBSsurface, according to various embodiments of the present invention.

DETAILED DESCRIPTION

In the following description, numerous specific details are set forth toprovide a more thorough understanding of the present invention. However,it will be apparent to one of skill in the art that embodiments of thepresent invention may be practiced without one or more of these specificdetails.

Hardware Overview

FIG. 1 illustrates a computing system 100 configured to implement one ormore aspects of the present invention. This figure in no way limits oris intended to limit the scope of the present invention. Computingsystem 100 may be a personal computer, video game console, personaldigital assistant, mobile phone, mobile device, or any other devicesuitable for implementing one or more aspects of the present invention.

As shown, computing system 100 includes, without limitation, a processor102, display processor 112, input/output (I/O) bridge 107, and systemmemory 104, coupled together and communicating via a bus path that mayinclude a memory bridge 105. Processor 102 may be any technicallyfeasible form of processing device configured to process data andexecute program code. Processor 102 could be, for example, a centralprocessing unit (CPU), a graphics processing unit (GPU), anapplication-specific integrated circuit (ASIC), a field-programmablegate array (FPGA), and so forth. Likewise, display processor 112 may beany technically feasible form of processing device configured to processdata and execute program code. Display processor 112 could be, forexample, a central processing unit (CPU), a graphics processing unit(GPU), an application-specific integrated circuit (ASIC), afield-programmable gate array (FPGA), and so forth.

Processor 102 and display processor 112 include one or more processingcores. In operation, one or both of processor 102 and display processor112 is the master processor of computing system 100, controlling andcoordinating operations of other system components. System memory 104stores software applications and data for use by processor 102. Eitheror both of processor 102 and display processor 112 execute softwareapplications stored within system memory 104 and optionally an operatingsystem. In particular, either or both of processor 102 and displayprocessor 112 executes software and then performs one or more of thefunctions and operations set forth in the present application. Memorybridge 105, which may be, e.g., a Northbridge chip, is connected via abus or other communication path (e.g., a HyperTransport link) to an I/O(input/output) bridge 107. I/O bridge 107, which may be, e.g., aSouthbridge chip, receives user input from one or more user inputdevices 108 (e.g., keyboard, mouse, joystick, digitizer tablets, touchpads, touch screens, still or video cameras, motion sensors, and/ormicrophones) and forwards the input to processor 102 via memory bridge105.

A display processor 112 is coupled to memory bridge 105 via a bus orother communication path (e.g., a PCI Express, Accelerated GraphicsPort, or HyperTransport link); in one embodiment display processor 112is a graphics subsystem that includes at least one graphics processingunit (GPU) and graphics memory. Graphics memory includes a displaymemory (e.g., a frame buffer) used for storing pixel data for each pixelof an output image. Graphics memory can be integrated in the same deviceas the GPU, connected as a separate device with the GPU, and/orimplemented within system memory 104.

Display processor 112 periodically delivers pixels to a display device110 (e.g., a screen or conventional CRT, plasma, OLED, SED or LCD basedmonitor or television). Additionally, display processor 112 may outputpixels to film recorders adapted to reproduce computer generated imageson photographic film. Display processor 112 can provide display device110 with an analog or digital signal.

A system disk 114 is also connected to I/O bridge 107 and may beconfigured to store content and applications and data for use byprocessor 102 and display processor 112. System disk 114 providesnon-volatile storage for applications and data and may include fixed orremovable hard disk drives, flash memory devices, and CD-ROM, DVD-ROM,Blu-ray, HD-DVD, or other magnetic, optical, or solid state storagedevices.

A switch 116 provides connections between I/O bridge 107 and othercomponents such as a network adapter 118 and various add-in cards 120and 121. Network adapter 118 allows computing system 100 to communicatewith other systems via an electronic communications network, and mayinclude wired or wireless communication over local area networks andwide area networks such as the Internet.

Other components (not shown), including USB or other port connections,film recording devices, and the like, may also be connected to I/Obridge 107. For example, an audio processor may be used to generateanalog or digital audio output from instructions and/or data provided byprocessor 102, system memory 104, or system disk 114. Communicationpaths interconnecting the various components in FIG. 1 may beimplemented using any suitable protocols, such as PCI (PeripheralComponent Interconnect), PCI Express (PCI-E), AGP (Accelerated GraphicsPort), HyperTransport, or any other bus or point-to-point communicationprotocol(s), and connections between different devices may use differentprotocols, as is known in the art.

In one embodiment, display processor 112 incorporates circuitryoptimized for graphics and video processing, including, for example,video output circuitry, and constitutes a graphics processing unit(GPU). In another embodiment, display processor 112 incorporatescircuitry optimized for general purpose processing. In yet anotherembodiment, display processor 112 may be integrated with one or moreother system elements, such as the memory bridge 105, processor 102, andI/O bridge 107 to form a system on chip (SoC). In still furtherembodiments, display processor 112 is omitted and software executed byprocessor 102 performs the functions of display processor 112.

Pixel data can be provided to display processor 112 directly fromprocessor 102. In some embodiments of the present invention,instructions and/or data representing a scene are provided to a renderfarm or a set of server computers, each similar to computing system 100,via network adapter 118 or system disk 114. The render farm generatesone or more rendered images of the scene using the provided instructionsand/or data. These rendered images may be stored on computer-readablemedia in a digital format and optionally returned to computing system100 for display. Similarly, stereo image pairs processed by displayprocessor 112 may be output to other systems for display, stored insystem disk 114, or stored on computer-readable media in a digitalformat.

Alternatively, processor 102 provides display processor 112 with dataand/or instructions defining the desired output images, from whichdisplay processor 112 generates the pixel data of one or more outputimages, including characterizing and/or adjusting the offset betweenstereo image pairs. The data and/or instructions defining the desiredoutput images can be stored in system memory 104 or graphics memorywithin display processor 112. In an embodiment, display processor 112includes 3D rendering capabilities for generating pixel data for outputimages from instructions and data defining the geometry, lightingshading, texturing, motion, and/or camera parameters for a scene.Display processor 112 can further include one or more programmableexecution units capable of executing shader programs, tone mappingprograms, and the like.

Processor 102, render farm, and/or display processor 112 can employ anysurface or volume rendering technique known in the art to create one ormore rendered images from the provided data and instructions, includingrasterization, scanline rendering REYES or micropolygon rendering, raycasting, ray tracing, image-based rendering techniques, and/orcombinations of these and any other rendering or image processingtechniques known in the art.

It will be appreciated that the system shown herein is illustrative andthat variations and modifications are possible. The connection topology,including the number and arrangement of bridges, may be modified asdesired. For instance, in some embodiments, system memory 104 isconnected to processor 102 directly rather than through a bridge, andother devices communicate with system memory 104 via memory bridge 105and processor 102. In other alternative topologies display processor 112is connected to I/O bridge 107 or directly to processor 102, rather thanto memory bridge 105. In still other embodiments, I/O bridge 107 andmemory bridge 105 might be integrated into a single chip. The particularcomponents shown herein are optional; for instance, any number of add-incards or peripheral devices might be supported. In some embodiments,switch 116 is eliminated, and network adapter 118 and add-in cards 120,121 connect directly to I/O bridge 107.

Fitting NURBS Surface to Large-Size Mesh Representations

FIG. 2 is a block diagram of a computer aided design (CAD) system 200 asimplemented on the computing system 100 of FIG. 1, according to variousembodiments of the present invention. In some embodiments, at least aportion of the CAD system 200 may be implemented via the computingsystem 100 of FIG. 1. As shown, the CAD system 200 includes, withoutlimitation, a central processing unit (CPU) 202, storage 204, aninput/output (I/O) devices interface 206, a network interface 208, aninterconnect 210, and a system memory 212. The computing system 100 ofFIG. 1 can be configured to implement the CAD system 200. The processor202, storage 204, I/O devices interface 206, network interface 208,interconnect 210, and system memory 212 function substantially the sameas described in conjunction with FIG. 1 except as further describedbelow.

The processor 202 retrieves and executes programming instructions storedin the system memory 212. Similarly, the processor 202 stores andretrieves application data residing in the system memory 212. Theinterconnect 210 facilitates transmission, such as of programminginstructions and application data, between the processor 202,input/output (I/O) devices interface 206, storage 204, network interface208, and system memory 212. The I/O devices interface 206 is configuredto receive input data from user I/O devices 222. Examples of user I/Odevices 222 may include one of more buttons, a keyboard, and a mouse orother pointing device. The I/O devices interface 206 may also include anaudio output unit configured to generate an electrical audio outputsignal, and user I/O devices 222 may further include a speakerconfigured to generate an acoustic output in response to the electricalaudio output signal. Another example of a user I/O device 222 is adisplay device that generally represents any technically feasible meansfor generating an image for display. For example, the display device maybe a liquid crystal display (LCD) display, CRT display, or DLP display.The display device may be a TV that includes a broadcast or cable tunerfor receiving digital or analog television signals.

Processor 202 is included to be representative of a single CPU, multipleCPUs, a single CPU having multiple processing cores, and the like. Andthe system memory 212 is generally included to be representative of arandom access memory. The storage 204 may be a disk drive storagedevice. Although shown as a single unit, the storage 204 may be acombination of fixed and/or removable storage devices, such as fixeddisc drives, floppy disc drives, tape drives, removable memory cards, oroptical storage, network attached storage (NAS), or a storagearea-network (SAN). Processor 202 communicates to other computingdevices and systems via network interface 208, where network interface208 is configured to transmit and receive data via a communicationsnetwork.

The system memory 212 includes, without limitation, a CAD applicationprogram 230, large-size mesh representations 240 (hereinafter, meshrepresentations 240), and high-level smooth-surface representations 242(hereinafter NURBS surfaces 242). The CAD application program 230, inturn, includes, without limitation, a subdividing engine 231, a vertexsolving engine 232, an edge solving engine 234, a patch solving engine236, and a patch merging engine 238.

The CAD application program 230 includes tools for creating andmodifying 3D models. Such 3D models may be generated from a scan of aphysical model with a laser scanner or may be created from within theCAD application program 230. In various embodiments, the CAD applicationprogram 230 may reside on a single user system, where such a systemaccommodates one user at any given time. Alternatively, CAD applicationprogram 230 may reside on one or more multi-user systems, where a groupof users may collaboratively create and modify 3D models. Althoughdescribed in the context of a CAD application program, anycomputer-implemented graphics program configured to perform thedisclosed techniques is within the scope of the present invention.

As further described herein, the subdividing engine 231 retrieves a meshrepresentation from a set of mesh representations 240. The meshrepresentation may be formatted via any technically feasible fileformat, including, without limitation, stereo lithography CAD softwarefile format, also referred to as STL files, and geometry objectdefinition file format, also referred to as OBJ files. The subdividingengine 231 creates a parametrization for the input mesh by assigning theproper (u, v) value for each point in the mesh representation. Thesubdividing engine 231 parameterizes the mesh representation via anytechnically feasible approach, including, without limitation, planarparametrization, spherical parametrization, conformal mapping, andsurface area preserving mapping. In some embodiments, the meshrepresentation may have been previously parameterized.

The subdividing engine 231 then subdivides the parameterized meshrepresentation into a set of substantially equally sized patches, wherethe size of each patch in the parametric domain is substantially equalto the size of the other patches in the parametric domain. Thissubdivision results in a number of vertices and edges that are shared byneighboring patches. In some embodiments, a patch in the parametricdomain may be a 2D rectangle.

After subdividing the mesh representation, the subdividing engine 231transfers the subdivided mesh representation to the vertex solvingengine 232 to begin the processing of fitting each patch in thesubdivided mesh representation to a corresponding NURBS surface. Moreparticularly, a NURBS surface of degree p in u-direction and degree q inv-direction is defined as a bivariate piecewise rational function of theform shown in Equation 1 below:

$\begin{matrix}{{S\left( {u,v} \right)} = {\sum\limits_{i = 0}^{n}{\sum\limits_{j = 0}^{m}{P_{i,j}w_{i,j}{N_{i,p}(u)}{N_{j,q}(v)}\text{/}{\sum\limits_{i = 0}^{n}{\sum\limits_{j = 0}^{m}{w_{i,j}{N_{i,p}(u)}{N_{j,q}(v)}}}}}}}} & (1)\end{matrix}$where {P_(i,j)} are (n+1)×(m+1) control points, {w_(i,j)} are theweights associated with the corresponding control points, and N_(i,p)(u)and N_(j,q)(v) are the B-spline base functions of degree p and q in theu- and v-directions respectively.

A common used technique to fit a NURBS surface to a set of mesh points Mis the least squares fitting which minimizes the function shown inEquation 2 below:

$\begin{matrix}{f = {{\sum\limits_{k = 0}^{M - 1}{{Q_{k} - {S\left( {u_{k},v_{k}} \right)}}}^{2}} + {\lambda\; F_{smooth}}}} & (2)\end{matrix}$where {Q_(k)} are a set of mesh points, F_(smooth) is a smoothnessfunction, and λ is the weight that determines the trade-off between theleast-squares result and the smoothing term. The smoothness function isbased on the thin-plate deformation energy as given by Equation 3 below:

$\begin{matrix}{F_{smooth} = {\int{\int{\left( {S_{uu}^{2} + {2\; S_{uv}^{2}} + S_{vv}^{2}} \right)d\; u\; d\; v}}}} & (3)\end{matrix}$

If the control points, parameters of mesh points, knots, and the weightsare all unknown, solving Equation 3 leads to a non-linear optimizationproblem. In order to simplify these calculations, the vertex solvingengine 232 assumes that the needed parametrization is readily obtainedand that the knot vectors and weights are set a priori. Specifically,the vertex solving engine 232 sets the weights to be unit weights, thatis, {w_(i,j)}=1. Given these assumptions, way the high-levelsmooth-surface representation given by Equation 1 is reduced to anon-rational B-spline where the only unknowns in Equation 2 are thecontrol points, The control points are then obtained by solving thefollowing linear equations given by Equation 4 below:(A ^(T) A+λK)X=A ^(T) B  (4)where A, referred to herein as the system matrix, is an M×N matrix withN=(n+1)×(m+1) whose elements are B-spline basis function values, K isthe matrix containing the integration values of derivatives of theB-spline base functions, X=[P_(0,0), . . . , P_(n,m)]^(T), and B=[Q₀, .. . , Q_(M-1)]^(T).

In general, the system matrix A in Equation 4 is a sparse matrix that issymmetric, positive, and definite but not always well-conditioned. Ifthe system matrix A is well-conditioned, then the solution is unique andcan be obtained by methods such as Cholesky decomposition and otheriterative methods. As shown by Equation 4, the size of the linear systemto be solved is the same as the number of control points.

The vertex solving engine 232 computes the continuity constraints ateach vertex of each patch. These vertex continuity constraints are thenused by the edge solving engine 234 to compute constraints along theedges adjacent to the corresponding vertex. For each vertex in the meshrepresentation, the vertex solving engine 232 locally fits a NURBSsurface at the vertex based on the mesh points around the vertex. Thenthe vertex solving engine 232 obtains the continuity constraints for thevertex by evaluating the derivatives of the fitted surface at thatvertex.

In order for the continuity constraints at a vertex to reflect theunderlying global surface as much as possible, the local surface fittingincludes a fixed number l of mesh points in the neighborhood of thevertex. To find l nearest mesh points to a vertex P, mesh points areselected based on the proximity of each mesh point to the vertex. Thevertex solving engine 232 selects the l nearest mesh points that areclosest to the vertex by evaluating the mesh points within a smallregion surrounding the vertex. If the number of mesh points in theregion is greater than equal to l, then the vertex solving engine 232selects the l nearest mesh points. Otherwise, the vertex solving engine232 increases the size of the region until at least l mesh points arefound.

The vertex solving engine 232 then solves a fitting equation similar toEquation 3, but where mesh points near the vertex P have more influence,as determined by weighting factors. The weighted least squaresformulation is given by Equation 5 below:

$\begin{matrix}{f = {\sum\limits_{k = 0}^{l - 1}{{\theta\left( {{\left( {u_{p},v_{p}} \right) - \left( {u_{k},v_{k}} \right)}} \right)}{{Q_{k} - {S\left( {u_{k},v_{k}} \right)}}}^{2}}}} & (5)\end{matrix}$where (u_(p), v_(p)) are the parametric values of vertex P and θ is aweighting function that has a maximum value at vertex P and decreasesbased on the distance from vertex P. In some embodiments, the weightingfunction is based on a Gaussian distribution function.

The vertex solving engine 232 solves Equation 5 to yield a local surfacethat is evaluated at vertex P to represent the continuity constraints interms of position and derivatives. Due to the way the l mesh points areselected, the local surface is fitted robustly even if the vertex P iswithin a holes or crack in the original mesh representation. Once thevertex solving engine 232 has computed the continuity constraints foreach vertex, the vertex solving engine 232 transfers the results to theedge solving engine 234 for further processing.

The edge solving engine 234 computes the continuity constraints alongedges within the mesh representation. For each pair of neighboringpatches that shares an edge, the edge solving engine 234 fits thecontinuity constraints along the shared edge so that the resultingsurfaces corresponding to the two neighboring patches exhibit C²continuity with respect to each other. Similarly as described for thevertex solving engine 232, the edge solving engine 234 locally fits asurface for an edge by selecting mesh points in the neighborhood of theedge. Then the edge solving engine 234 computes the continuityconstraints as positions and derivatives of the fitted surface along thecorresponding edge.

The edge solving engine 234 performs a surface fitting for an edge basedon all mesh points in the two neighboring patches. In order to preventthe singularity caused by empty patches, where no neighboring meshpoints may be found within one or both of the neighboring patches, theedge solving engine 234 also selects the vertices of the two neighboringpatches as additional mesh points for fitting. In addition, the edgesolving engine 234 interpolates the position and derivatives of the twovertices of the shared edge between the neighboring patches so that thefitted surfaces of the two patches sharing the two vertices are C²continuous at the shared edge. The interpolation constraints arerepresented by the linear equation given as Equation 6 below:CX=D  (6)where X are the control points of the surface to be fitted, C is amatrix storing the corresponding B-spline function values, and Drepresents the position and derivatives to be interpolated at the twovertices. Combining Equation 6 with Equation 2 leads to the constrainedfitting equation given by Equation 7 below:

$\begin{matrix}{{\begin{bmatrix}{{A^{T}A} + {\gamma\; K}} & C^{T} \\C & 0\end{bmatrix}\begin{bmatrix}X \\\omega\end{bmatrix}} = \begin{bmatrix}{\gamma\; A^{T}B} \\D\end{bmatrix}} & (7)\end{matrix}$where ω is a vector storing Lagrange multipliers. The edge solvingengine 234 solves Equation 7 to yield a surface that interpolates thepositions and derivatives at the two vertices of a corresponding edge.Once the edge solving engine 234 has computed the continuity constraintsfor each edge, the edge solving engine 234 transfers the results to thepatch solving engine 236 for further processing.

Once boundary continuity constraints are computed, the patch solvingengine 236 fits a NURBS surface to each corresponding patch. The patchsolving engine 236 first determines the boundary control points based onC⁰, C¹, and C² continuity conditions, where C⁰, C¹, and C² representposition, tangency, and curvature continuity, respectively. The patchsolving engine 236 then solves a fitting equation similar to Equation 2for the remaining control points, as now described.

The boundary continuity constraints for a patch along a particular edgeare obtained by directly evaluating the local surface fitted by the edgesolving engine 234, where the edge solving engine 234 interpolates theposition and derivatives at the two end vertices of the shared edge. Asa result, the neighboring patches are continuous at the end vertices.Furthermore, two neighboring patches that share a common edge arecontinuous along the edge, since the neighboring patches are fittedusing the same continuity constraints, as previously described.

The patch solving engine 236 then converts these continuity constraintsto control points through a standard least squares fitting of curve tothe patch. For the convenience of the subsequent merging process, theknot vectors in u- and v-directions for a patch are pre-defined.Specifically, the patch solving engine 236 uses uniform knots so that aknot vector is easily calculated, given the knot interval and the numberof knots. In order for the linear system to be well-conditioned, thepatch solving engine 236 creates at least one sample per knot interval.The start and end control points for the NURBS surface are directlyobtained from the start and end points or derivatives of thecorresponding patch. These two control points are fixed for the curvefitting process. The patch solving engine 236 then computes controlpoints in a first, second, and third ring of control points thatsurround a given patch by solving curve fitting equations for position,first derivative, and second derivative, respectively. With the controlpoints in the first, second, and third rings of mesh points being fixed,the patch solving engine 236 computes a version of the surface fittingEquation 2, as modified for patch fitting and given as Equation 8 below:(Ã ^(T) Ã+λ{tilde over (K)}){tilde over (X)}=Ã ^(T) B−(A _(ring) ^(T) A_(ring) +λK _(ring))P _(ring)  (8)where P_(ring) is a matrix containing the control points in the first,second, and third rings of mesh points, respectively, {tilde over (X)}contains the rest of control points within the patch, Ã is a matrixcontaining the B-spline values corresponding control points {tilde over(X)}, A_(ring) is a matrix containing the B-spline values correspondingcontrol points P_(ring), and {tilde over (K)} and K_(ring) are thematrices containing the integration values of B-spline basis functions.{tilde over (K)} corresponds to the interior control points (to besolved), and K_(ring) corresponds to the fixed control points P_(ring)in the 1^(st), 2^(nd), and 3^(rd) rings, respectively. In someembodiments, continuity of higher than C² may be achieved betweenneighboring patches in a similar fashion. For example, for C³continuity, the patch solving engine 236 would first compute a fourthring of control points around the patch, and then solve Equation 8 forthe remainder of control points.

Once the patch solving engine 236 fits a NURBS surface to eachcorresponding patch, the CAD system 200 determines whether a fittingtolerance has been met for each NURBS surface to the correspondingpatch. If the fitting tolerance has been met for each NURBS surface,then the patch solving engine 236 transfers the results to the patchmerging engine 238 for further processing. If the fitting tolerance isnot met for one or more NURBS surfaces, then the CAD system 200 furthersubdivides at least the patches corresponding to the NURBS surfaces thatdid not meet the fitting tolerance. The CAD system 200 then transfersthe results to the vertex solving engine 232 for an additional iterationof the fitting process.

After NURBS surfaces have been created for each patch, and the fittingtolerance condition is met, the patch merging engine 238 merges aremerges the NURBS surface into one single NURBS surface for output. Asingle NURBS surface output is desirable for the subsequent CADoperations due to the compactness and the algorithmic properties of asingle NURBS surface, such as convex hull and variation diminishingproperties. Because surfaces of neighboring patches exhibit C²continuity with respect to each other, the patch merging engine 238 canmerge the NURBS surfaces using the standard NURBS algorithms. The patchmerging engine 238 merges the NURBS surfaces for the patches pairwise.For example, a mesh representation could be subdivided into patchesarranged in a two dimensional array of rows and columns. The patchmerging engine 238 could merge the NURBS surface for the patch in thelower left corner with the NURBS surface for the neighboring patch tothe right. The patch merging engine 238 could then merge the resultingNURBS surface with the NURBS surface for the next neighboring patch tothe right. The process continues until the patch merging engine 238 hasmerged all NURBS surfaces in the first row. In a similar fashion, thepatch merging engine 238 merges the NURBS surfaces corresponding to thepatches in the second row. The patch merging engine 238 could then mergeeach NURBS surface in the first row with the neighboring NURBS surfacein the second row until all NURBS surfaces in the first row are mergedwith corresponding NURBS surface in the second row. The patch mergingengine 238 continues this pairwise merging process until all NURBSsurfaces are merged with neighboring patches on the same row and onadjacent rows. At the end of the merge process, the patch merging engine238 produces a single NURBS surface that corresponds to the entireoriginal mesh representation. Finally, the patch merging engine 238stores the resulting NURBS surface into the set of NURBS surfaces 242.

Notably, neighboring patch surfaces share the same knot vectors ineither u- or v-directions. Therefore, the patch merging engine 238merges two neighboring surfaces into a composite surface via a knotremoval algorithm. Because two neighboring patches exhibit C² continuitywith respect to each other, the patch merging engine 238 can remove twoidentical knots in the merge direction without affecting the level ofcontinuity of the resulting surface.

After the patch merging engine 238 completes the merge process toproduce a single NURBS surface, the patch merging engine 238 transfersthe resulting NURBS surface to the CAD system 200, which, in turn,stores the NURBS surface into the set of NURBS surfaces 242.

Table 1 below illustrates the results of fitting a NURBS surface to anoriginal mesh representation resulting from scanning a physical model.The exemplary mesh representation contains 402,600 triangles and 203,122points.

TABLE 1 Absolute Relative Number of Absolute maximum Relative maximumcontrol points average error error average error error 28 × 34 0.3324483.512967 0.001039211 0.010981313 80 × 98 0.042422 1.175590 0.0001326080.003674820 132 × 162 0.018868 0.478050 5.89802E−05 0.001494354 184 ×226 0.010647 0.357578 3.32818E−05 0.001117766 314 × 386 0.0036540.164922 1.14222E−05 0.000515536 418 × 514 0.00183 0.089752 5.72046E−060.000280559 548 × 674 0.000886 0.058307 2.76958E−06 0.000182264 730 ×898 0.000398 0.052738 1.24412E−06 0.000164856  886 × 1090 0.0002420.059587 7.56477E−07 0.000186265 1016 × 1250 0.000180 0.0647555.62669E−07 0.000202420

The average and maximum error data between the fitted NURBS surface andthe original mesh representation is shown for various numbers of controlpoints. The absolute average and absolute maximum error are directlycomputed by comparing the position of each NURBS surface against theposition of each corresponding patch. The relative average and relativemaximum error are computed by dividing the corresponding absolute errorby the dimension of the mesh representation. For the example meshrepresentation shown in Table 1, the mesh dimension is 319.904095 units.Under some surface refitting techniques, the fitting tolerance isexpressed as a maximum allowable absolute error. However, if a meshrepresentation includes mesh points associated with a hole, crack, orother imperfection of the mesh representation, the absolute error aroundsuch mesh points is likely to be unacceptably high. As a result, thefitting tolerance is better expressed as an average error, to smooth outand reduce the effect of outlier mesh points resulting fromimperfections in the mesh representation. As a result, the disclosedtechniques automatically fits a NURBS surface to the mesh representationthat automatically reduces the effects of such outlier mesh points,thereby increasing the overall fit quality of the NURBS surface.

The appropriate number of control points would be determined based on adesired fitting tolerance. As shown in Table 1, the error decreases asthe number of control points increases. In other words, to achieve aparticular fitting tolerance, the fitting process is iterated until thenumber of control points is high enough to achieve an error value thatis less than or equal to the desired fitting tolerance. So, for example,to achieve a fitting tolerance of less than 10-6 relative average error,the number of control points in the final fitted surface would begreater than 730×898 but less than 886×1090, such as 834×1026.

In some cases, a particular mesh representation may have an irregularshape that cannot be precisely subdivided into an array of rectangularpatches. In such cases, the CAD system 200 creates a parametric domainthat is larger in size than the mesh representation, and subdivides thelarger parametric domain into patches. The fitting process progresses asdescribed herein to produce a single NURBS surface that is larger thanthe original mesh representation. The NURBS surface is then trimmed toremove the surface areas that extend beyond the boundaries of the meshrepresentation.

The majority of the computational load consumed during theabove-described fitting process is consumed by the vertex solving, edgesolving, and patch solving process. The percentage of computational loadfor these three processes increases as the size of the meshrepresentation increases. Because these processes perform local fitting,these three processes can be parallelized. As a result, the vertexsolving engine 232 can operate on multiple vertices in parallel.Likewise, the edge solving engine 234 can operate on multiple edges inparallel and the patch solving engine 236 can operate on multiplepatches in parallel. As one example, the following description exhibitsthe benefit of performing the vertex solving process in a parallel,multi-threaded architecture.

Consider a mesh representation that is divided into n×m patches. As aresult, the subdivided mesh representation includes (n+1)×(m+1)vertices, each of which is to be processed by the vertex solving engine232. Via a multithreading programming interface, such as threadingbuilding blocks (TBB) from Intel Corporation, the process performed bythe vertex solving engine 232 can be expressed in a parallel fashion,and the programming interface the maps the parallelized processes toavailable cores in a multicore processing system. The multithreadedprogramming interface determines the set of available threads and mapslogical tasks into the available threads with support for nestedparallelism. The vertex solving process is defined such that eachlogical task can be performed independently, and each logical task isapproximately equal in terms of computational load. The logical tasksare then passed into a multi-threading function, such as theparallel_do( ) function of TBB, for execution. After the multi-threadingfunction has finished, the results in the form of derivatives at eachvertex are collected. The following pseudo-code is one example ofperforming the vertex solving process in a parallel, multi-threadedfashion:

/* define vertex solvers */ for i=0,1, ..., n do     for j=0,1,...,m do     vertex_solvers[i][j] = make_vertex_solver(i,j);     end for end for/* construct solvers */ parallel_do (vertex_solvers); /*solver outputs*/ for i=0,1, ..., n do     for j=0,1,...,m do     vertex_solver[i][j]->output();     end for end for

The effects of implementing the vertex solving engine 232 as a parallel,multithreaded engine is illustrated in Table 2 below:

TABLE 2 Number of 1 Core 2 Cores 4 Cores 8 Cores 12 Cores Number ofNumber of Control Time Time Time Time Time Triangles Points Points(sec.) (sec.) Factor (sec.) Factor (sec.) Factor (sec.) Factor 2,907,9861,461,056 514 × 514 339.315 176.804 1.919 102.610 3.307 54.468 6.23043.528 7.795 3,403,518 1,704,052 514 × 490 451.800 229.908 1.965 131.1843.444 72.823 6.204 54.378 8.308 5,043,014 2,524,089 642 × 642 605.911318.429 1.903 176.701 3.429 98.625 6.144 77.750 7.793 8,942,4544,475,757 770 × 362 678.502 376.888 1.800 215.588 3.147 134.593 5.041109.426 6.201 12,429,274 6,220,018 1026 × 778  1038.850 580.589 1.789321.185 3.234 197.923 5.249 166.888 6.225

As shown, the performance of the vertex solver engine 232 is given forvarious numbers of processing cores for mesh representations of varioussizes in the range of approximately 1.4 million points to approximately6.2 million points at a relative average tolerance of 10⁻⁵. The time inseconds is given as is the speedup factor relative to a single coreimplementation, indicating that a multi-threading implementation of thevertex solver engine 232 achieves significant gains in performance. Forexample, implementing vertex solver engine 232 on a 12-core systemresults in an overall speedup factor of approximately 8. Notably, thespeedup factor of the vertex solver engine 232 is higher, such asapproximately 10. However, the overall speedup factor is reduced toapproximately 8 due to the “overhead” processes that are notparallelized, such as (u, v) parameterization and domain subdivision.

As shown in Table 2, overall performance, as measured by speedup factor,increases as the size of the mesh representation increases up to acertain point, after which the speedup factor decreases with furtherincreases in mesh representation size. Again, this is due to the effectof the overhead processes that are not parallelized. That is, as thesize of the mesh representation increases, a point is reached where theadditional speedup due to parallelizing the vertex solving engine 232 isless than the additional computational load of parameterizingsubdividing the larger size mesh representation. Similarly, themulti-threading speed-up factor may decrease as the number of processingcores increases, due to the higher percentage of overhead processingrelative to the average per-core processing load of the parallelizableprocesses.

FIG. 3 illustrates an example of how a mesh representation 300 isdivided into rectangular patches in the (u, v) parametric domain,according to various embodiments of the present invention. As shown, themesh representation 300 is subdivided into a group of equally sizedpatches, such as patch 330, that are conjoined at shared edges, such asedge 320, and shared vertices, such as vertex 310. By subdividing themesh representation 300 into patches, a large fitting task, that is,fitting the entire mesh representation 300 onto a NURBS surface, isbroken down into a series of smaller tasks, where groups of mesh pointsare divided into patches, where each patch is individually and moreefficiently fitted with a NURBS surface.

As shown, exemplary patch 330 is illustrated as a quadrilateral withfour boundary edges parallel to the u- and v-axes of the parametricdomain for mesh representation 300. An edge 320 of patch 330 is sharedby exactly two patches if patch 330 is not a boundary edge, that is, ifpatch 330 does not lie on the domain boundary. A vertex 310 is shared byexactly four edges and four patches if the vertex 310 is not a boundaryvertex of the mesh representation 300. This topological information asto which patches and vertices are on a boundary of the meshrepresentation 300 is used for specifying the boundary continuityconstraints when fitting each patch to neighboring patches.

FIG. 4 illustrates an example of a hierarchical data structure 400 forthe domain subdivision of FIG. 3, according to various embodiments ofthe present invention. As shown, the hierarchical data structure 400includes a root node 410, first level child nodes 420, 422, 424, and426, second level child nodes 430, 432, 434, and 436, and mesh pointnodes 440, 442, 444, and 446.

Mesh points are efficiently assigned to corresponding patches via theillustrated quadtree-like hierarchical data structure 400. Initially,after mesh points have been parameterized with corresponding (u, v)values, all mesh points in the parametric domain are assigned to rootnode 410. The root node 410 is then recursively subdivided into four,equally sized first level child nodes 420, 422, 424, and 426, where eachof the child nodes first level 420, 422, 424, and 426 corresponds to apatch that covers one-fourth of the domain space covered by root node410. During subdivision of a particular node, the mesh points containedin that node are reassigned to the corresponding child nodes accordingto the (u, v) values of the mesh points. That is, mesh points containedin root node 410 are reassigned to first level child nodes 420, 422,424, and 426 based on the corresponding (u, v) values of each of themesh points in root node 410. Likewise, mesh points contained in firstlevel child node 420 are reassigned to second level child nodes 420,422, 424, and 426 based on the corresponding (u, v) values of each ofthe mesh points in child node 420. As a result, exemplary second levelchild node 430 contains mesh points 440, 442, 444, and 446. Each childnode is further subdivided until child nodes contain no mesh points or amaximum subdivision level is reached. If a particular node does notcontain any mesh points, then that node is identified as an empty node.At the end of the subdivision process, all mesh points are assigned tothe corresponding patches. In this manner, the parametric domain of amesh representation is subdivided coarsely at the beginning of thefitting process and then more finely until a fitting tolerance issatisfied.

FIG. 5 illustrates how continuity constraints at a vertex 510 of themesh representation 300 of FIG. 3 are computed, according to variousembodiments of the present invention. As shown, a region 500 includes avertex 510, a first surrounding region 520, a second surrounding region530, and a third surrounding region 540.

As described herein, the vertex solving engine 232 computes thecontinuity constraints at a vertex 510 that are, in turn, used tocompute constraints along the edges adjacent to the vertex 510. For eachvertex 510, the vertex solving engine 232 locally fits a surface using aquantity l of mesh points selected from the region surrounding thevertex 510. The vertex solving engine 232 then computes continuityconstraints by evaluating the derivatives of the fitted surface at thatvertex 510.

In order for the continuity constraints at a vertex 510 to closelyreflect the underlying global surface, the local surface fittingincludes a fixed number l of mesh points in the neighborhood of vertex510. To find l nearest mesh points to a vertex 510, mesh points arefirst selected from the first surrounding region 510. If the number ofmesh points in first surrounding region 510 is greater than or equal to1, then the l mesh points closest to vertex 510 are selected. If thenumber of mesh points in first surrounding region 510 is less than l,then additional mesh points are selected from second surrounding region530. If the total number of mesh points in first surrounding region 510and second surrounding region 530 is less than l, then additional meshpoints are selected from third surrounding region 540. The processcontinues for additional, larger surrounding regions (not explicitlyshown) until l mesh points are selected.

FIG. 6 illustrates how continuity constraints at an edge 620 of the meshrepresentation 300 of FIG. 3 are computed, according to variousembodiments of the present invention. As described herein, the edgesolving engine 234 computing continuity constraints along an edge 620 byfitting mesh points in the two neighboring patches 630A and 630B thatshare edge 620.

The edge solving engine 234 performs surface fitting for the edge 620using all mesh points contained within the two neighboring patches 630Aand 630B. In the special case where one or both of the neighboringpatches 630A and 630B contain no internal mesh points, the edge solvingengine 234 also uses the vertices 601A, 601B, 601C, 601D, 601E and 601Fof the neighboring patches 630A and 630B as additional mesh points forfitting. In addition, the edge solving engine 234 interpolates theposition and derivatives of the two vertices 601E and 601F of the sharededge 620, so that the fitted surfaces of neighboring patches 630A and630B that share the vertices 601E and 601F are continuous at edge 620.The interpolation constraints can then be computed as further describedherein.

FIG. 7 illustrates how a patch of the mesh representation 300 of FIG. 3is fitted with a NURBS surface, according to various embodiments of thepresent invention. As shown, a region 700 includes points within thepatch, such as point 740, and points along a first ring, second ring,and third ring, such as points 710, 720, and 730, respectively.

As described herein, the patch solving engine 236 fits each patch withpre-computed boundary continuity constraints. The patch solving engine236 then converts from continuity constraints to control points throughthe standard least squares fitting of curve. For convenience of merging,the knot vectors in u- and v-directions for a patch are pre-defined.Specifically, the patch solving engine 236 uses uniform knots so that aknot vector is easily calculated, given the knot interval and the numberof knots. In order for the linear system to be well-conditioned, theedge solving engine 236 creates at least one sample per knot interval.The start and end control points are then determined. The control pointsin the first ring, such as control point 710, second ring, such ascontrol point 720, and third ring, such as control point 730, are thencomputed by solving curve fitting equations for position, firstderivative, and second derivative, respectively.

FIG. 8 is a flow diagram of method steps for fitting a meshrepresentation that includes a plurality of mesh points with a NURBSsurface, according to various embodiments of the present invention.Although the method steps are described in conjunction with the systemsof FIGS. 1-2, persons of ordinary skill in the art will understand thatany system configured to perform the method steps, in any order, iswithin the scope of the invention.

As shown, a method 800 begins at step 802, where a subdividing engine231 retrieves a mesh representation. The mesh representation can bestored in various formats, including, without limitation, STL format andOBJ format. At step 804, the subdividing engine 231 creates aparametrization for the input mesh representation by assigning theproper (u, v) value for each point in the mesh representation. Thesubdividing engine 231 may create the parametrization via anytechnically feasible approach, including, without limitation, planarparametrization, spherical parametrization, conformal mapping, andsurface area preserving mapping. At step 806, the subdividing engine 231mesh subdivides the mesh into a set of substantially equally sizedpatches in the parametric domain at the next step 806. The subdivisionresults in a number of vertices and edges that are shared by neighboringpatches.

At step 808, the vertex solving engine 232 computes continuityconstraints for each vertex by fitting a surface to the mesh points inthe nearest neighborhood of the vertex. At step 810, the edge solvingengine 234 derives the continuity constraints along an edge from meshpoints in the two neighboring patches. At step 812, the patch solvingengine 236 fits a NURBS surface to the mesh points contained in eachpatch based on the boundary edge constraints.

At step 814, the patch solving engine 236 determines whether a fittingtolerance condition is met, where the fitting tolerance conditionmeasures the closeness of fit between each fitted surface and thecorresponding patch. If the fitting tolerance is met for all fittedsurfaces, then the method 800 proceeds to step 818, where the patchmerging engine 238 merges the fitted surfaces of all patches into asingle large NURBS surface. The method 800 then terminates.

If, at step 814, the fitting tolerance is not met for one or more fittedsurfaces, then the method 800 proceeds to step 816, where thesubdividing engine 231 refines the subdivision for at least thosepatches corresponding to the fitted surfaces where the tolerancecondition is not met. The method 800 then proceeds to step 808,described above, for another iteration of the fitting process.

In sum, techniques are disclosed for precisely and efficiently fitting asingle high-level smooth-surface representation, such as a NURBSsurface, to a large-size mesh representation. Such a NURBS surface iscompact while retaining fine details of the corresponding meshrepresentation and is, therefore, more efficiently processed by a CADsystem. The mesh representation is iteratively subdivided into a set ofequal-sized rectangular patches in parametric space. The areas aroundthe patch boundaries are locally fitted, thereby establishingappropriate boundary continuity constraints between neighboring patches.The boundary continuity constraints of the patches are computed in sucha way that neighboring patches exhibit C² with respect to each other.Each patch is then fitted with the established continuity constraintsand the mesh points associated with the patch. The fitted patch surfacesare then merged into a single NURBS surface for output. The computationof boundary continuity constraints and the fitting of patches can beperformed independently, thereby providing a scalable and parallelizableapproach for fitting very large-size mesh representations to a singlehigh-level smooth-surface representation, such as a NURBS surface.

At least one advantage of the disclosed techniques is that a large-sizemesh representation with fine details is precisely and accuratelyreconstructed as a single NURBS surface, while imperfections in the meshrepresentation, such as holes and cracks, are repaired automatically.Another advantage of the disclosed techniques is that the generatedNURBS surface is more stable and well-conditioned relative to priorapproaches. The disclosed techniques are capable of generating NURBSsurfaces with millions of control points that are more robust and wellbehaved relative to prior approaches. Another advantage of the disclosedtechniques is that the techniques scales very well with subdivisionrefinement and are optimized for parallel operation. As a result, thedisclosed techniques may be implemented on multi-core systems over adistributed computing environment. As a result of such scalability,large-size mesh representations can be fitted with a NURBS surface evenon modest computer hardware platforms.

The descriptions of the various embodiments have been presented forpurposes of illustration, but are not intended to be exhaustive orlimited to the embodiments disclosed. Many modifications and variationswill be apparent to those of ordinary skill in the art without departingfrom the scope and spirit of the described embodiments.

Aspects of the present embodiments may be embodied as a system, methodor computer program product. Accordingly, aspects of the presentdisclosure may take the form of an entirely hardware embodiment, anentirely software embodiment (including firmware, resident software,micro-code, etc.) or an embodiment combining software and hardwareaspects that may all generally be referred to herein as a “circuit,”“module” or “system.” Furthermore, aspects of the present disclosure maytake the form of a computer program product embodied in one or morecomputer readable medium(s) having computer readable program codeembodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain, or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

Aspects of the present disclosure are described above with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to embodiments of thedisclosure. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, enable the implementation of the functions/acts specified inthe flowchart and/or block diagram block or blocks. Such processors maybe, without limitation, general purpose processors, special-purposeprocessors, application-specific processors, or field-programmableprocessors or gate arrays.

The flowchart and block diagrams in the figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present disclosure. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

While the preceding is directed to embodiments of the presentdisclosure, other and further embodiments of the disclosure may bedevised without departing from the basic scope thereof, and the scopethereof is determined by the claims that follow.

What is claimed is:
 1. A computer-implemented method for fitting a meshrepresentation that includes a plurality of mesh points with anon-rational uniform B-spline (NURBS) surface, the method comprising:subdividing the mesh representation into a first plurality of patches ina parametric domain; computing, for each boundary associated with thefirst plurality of patches, one or more boundary continuity constraints;and fitting, based on the boundary continuity constraints, a first patchincluded in the first plurality of patches with at least one partialNURBS surface.
 2. The computer-implemented method of claim 1, whereincomputing the one or more boundary continuity constraints comprisescomputing one or more vertex boundary continuity constraints for eachvertex included in a plurality of vertices associated with the firstplurality of patches, wherein the first patch is fitted with the atleast one partial NURBS surface based on the vertex boundary continuityconstraints.
 3. The computer-implemented method of claim 2, wherein theone or more vertex boundary continuity constraints for each vertex arebased on a set of mesh points included in the plurality of mesh pointsthat are within a threshold distance from the vertex.
 4. Thecomputer-implemented method of claim 1, wherein computing the one ormore boundary continuity constraints comprises computing one or moreedge boundary continuity constraints for each edge included in aplurality of edges associated with the first plurality of patches,wherein the first patch is fitted with the at least one partial NURBSsurface based on the edge boundary continuity constraints.
 5. Thecomputer-implemented method of claim 4, wherein the one or more edgeboundary continuity constraints for each edge are based on a set of meshpoints included in the plurality of mesh points that are within athreshold distance from the edge.
 6. The computer-implemented method ofclaim 1, further comprising: determining that the at least one partialNURBS surface meets or exceeds a fitting tolerance limit associated withthe first patch; and merging the at least one partial NURBS surface withat least one other partial NURBS surface to generate a final NURBSsurface.
 7. The computer-implemented method of claim 1, furthercomprising: determining that the at least one partial NURBS surface doesnot meet or exceed a fitting tolerance limit associated with the firstpatch; subdividing the first patch into a second plurality of patches;modifying the first plurality of patches by replacing the first patchwith the second plurality of patches; computing one or more modifiedboundary continuity constraints, and fitting, based on the one or moremodified boundary continuity constraints, a second patch included in thefirst plurality of patches with at least one partial NURBS surface. 8.The computer-implemented method of claim 1, wherein the one or moreboundary continuity constraints are further based on: boundaries of theat least one partial NURBS surface; and boundaries of at least one otherpartial NURBS surface that is adjacent to the at least one partial NURBSsurface.
 9. The computer-implemented method of claim 1, wherein fittingthe first patch included in the first plurality of patches with at leastone partial NURBS surface is further based on mesh points that arewithin the boundaries of the first patch.
 10. One or more non-transitorycomputer-readable storage media including instructions that, whenexecuted by one or more processors, cause the one or more processors tofit a mesh representation that includes a plurality of mesh points witha non-rational uniform B-spline (NURBS) surface by performing the stepsof: subdividing the mesh representation into a first plurality ofpatches in a parametric domain; computing one or more vertex boundarycontinuity constraints for each vertex included in a plurality ofvertices associated with the first plurality of patches; and fitting,based on the vertex boundary continuity constraints, a first patchincluded in the first plurality of patches with at least one partialNURBS surface.
 11. The one or more non-transitory computer-readablestorage media of claim 10, further comprising computing one or more edgeboundary continuity constraints for each edge included in a plurality ofedges associated with the first plurality of patches, wherein the firstpatch is fitted with the at least one partial NURBS surface based on theedge boundary continuity constraints.
 12. The one or more non-transitorycomputer-readable storage media of claim 11, wherein at least one ofcomputing the one or more vertex boundary continuity constraints andcomputing the one or more edge boundary continuity constraints isperformed as a parallel, multithreaded process.
 13. The one or morenon-transitory computer-readable storage media of claim 10, wherein eachpatch in the first plurality of patches is substantially equal in size.14. The one or more non-transitory computer-readable storage media ofclaim 10, wherein the at least one partial NURBS surface exhibits C⁰,C¹, and C² continuity with respect to at least one other partial NURBSsurface that is adjacent to the at least one partial NURBS surface. 15.The one or more non-transitory computer-readable storage media of claim14, wherein the at least one partial NURBS surface further exhibits C³continuity with respect to at least one other partial NURBS surface thatis adjacent to the at least one partial NURBS surface.
 16. The one ormore non-transitory computer-readable storage media of claim 10, whereinfitting the first patch included in the first plurality of patches withat least one partial NURBS surface is further based on mesh points thatare within the boundaries of the first patch.
 17. The one or morenon-transitory computer-readable storage media of claim 10, furthercomprising converting the one or more vertex boundary continuityconstraints into control points associated with the at least one partialNURBS surface.
 18. The one or more non-transitory computer-readablestorage media of claim 10, further comprising: determining that the atleast one partial NURBS surface meets or exceeds a fitting tolerancelimit with respect to the first patch; and merging the at least onepartial NURBS surface with at least one other partial NURBS surface togenerate a final NURBS surface.
 19. The one or more non-transitorycomputer-readable storage media of claim 10, further comprising:determining that the at least one partial NURBS surface does not meet orexceed a fitting tolerance limit with respect to the first patch;subdividing the first patch into a second plurality of patches;modifying the first plurality of patches by replacing the first patchwith the second plurality of patches; and computing one or more modifiedvertex boundary continuity constraints, and fitting, based on the one ormore modified vertex boundary continuity constraints, a second patchincluded in the first plurality of patches with at least one partialNURBS surface.
 20. A system, comprising: a memory that storesinstructions; and one or more processors coupled to the memory that,when executing the instructions, fit a mesh representation that includesa plurality of mesh points with a non-rational uniform B-spline (NURBS)surface by performing the steps of: subdividing the mesh representationinto a first plurality of patches in a parametric domain; computing, foreach boundary associated with the first plurality of patches, one ormore boundary continuity constraints; and fitting, based on the boundarycontinuity constraints, a first patch included in the first plurality ofpatches with at least one partial NURBS surface.